import http from '@/utils/common/http'

/**
 * 发布商品
 * */
export function addProduct (data) {
  return http({
    method: 'post',
    url: '/portal/business/product/saveProduct',
    header: {
      'Content-Type': 'application/json;charset=utf-8'
    },
    data
  })
}

/**
 * 文创商店首页查询文艺品列表
 * */
export function queryWaresList (data) {
  return http({
    method: 'post',
    url: '/portal/business/product/queryProductList',
    header: {
      'Content-Type': 'application/json;charset=utf-8'
    },
    data
  })
}

/**
 * 获取公告详情
 * */
export function getWaresDetails (data) {
  return http({
    method: 'post',
    url: '/portal/business/product/getProductDetails',
    header: {
      'Content-Type': 'application/json;charset=utf-8'
    },
    data
  })
}

/**
 * 编辑公告详情
 * */
export function editWares (data) {
  return http({
    method: 'post',
    url: '/portal/business/product/saveProduct',
    header: {
      'Content-Type': 'application/json;charset=utf-8'
    },
    data
  })
}

/**
 * 删除公告
 * */
export function deleteWares (data) {
  return http({
    method: 'post',
    url: '/portal/business/product/deleteProduct',
    header: {
      'Content-Type': 'application/json;charset=utf-8'
    },
    data
  })
}
